<template>
  <view class="orderGoods">
    <!-- <view class="total">共{{ cartInfo.length }}件商品</view> -->
    <view class="goodWrapper">
      <view
        class="item acea-row row-between-wrapper border"
        v-for="cart in cartInfo"
        :key="cart.id"
      >
        <view class="pictrue">
          <image :src="cart.productInfo.image" class="image" />
        </view>
        <view class="text">
          <view class="acea-row row-between-wrapper">
            <view class="name line1">{{ cart.productInfo.storeName }}</view>
          </view>
          <view class="attr line1" v-if="cart.productInfo.attrInfo">{{
            cart.productInfo.attrInfo.sku
          }}</view>
          <view class="price">
            <view class="money font-color-red" v-if="isIntegral"
              >{{ cart.costPrice }}积分</view
            >
            <view class="money font-color-red" v-else
              >￥{{ cart.truePrice }}</view
            >
            <view class="num">x {{ cart.cartNum }}</view></view
          >
          <view
            class="evaluate"
            v-if="evaluate == 3 && cart.isReply == 0"
            @click="routerGo(cart)"
            >评价</view
          >
        </view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  name: "OrderGoods",
  props: {
    evaluate: Number,
    cartInfo: {
      type: Array,
      default: () => [],
    },
    isIntegral: Boolean,
  },
  data: function () {
    return {};
  },
  mounted: function () {},
  methods: {
    routerGo(cart) {
      this.$yrouter.push({
        path: "/packageShop/pages/shop/GoodsEvaluate/index",
        query: { id: cart.unique },
      });
    },
  },
};
</script>
<style lang="less">
.orderGoods {
  border-radius: 20rpx;
  .border {
    display: flex;
  }
  .text {
    width: 494rpx;
    .price {
      .money {
        margin-top: 0;
      }
      display: flex;
      justify-content: space-between;
      align-content: center;
      margin-top: 24rpx;
    }
  }
}
</style>
